package com.plian.system.entity.pm.realproperty;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * 不动产登记信息表实体类
 *
 * @author BladeX
 * @since 2021-06-01
 */
@Data
@TableName("pm_real_property")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RealProperty对象", description = "不动产登记信息表")
public class RealProperty extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 填报单位
	*/
		@ApiModelProperty(value = "填报单位", required = true)
		private String fillingUnitId;
	/**
	* 编码
	*/
		@ApiModelProperty(value = "编码")
		private String code;
	/**
	* 归属单位
	*/
		@ApiModelProperty(value = "归属单位", required = true)
		private String orgId;

	/**
	 * 归属单位所属集团名称
	 */
	private String orgGrpName;
	/**
	* 不动产性质 1土地 2房产
	*/
		@ApiModelProperty(value = "不动产性质 1土地 2房产", required = true)
		private Integer realPropertyNature;
	/**
	* 地块名称
	*/
		@ApiModelProperty(value = "地块名称", required = true)
		private String landName;
	/**
	* 坐落位置
	*/
		@ApiModelProperty(value = "坐落位置", required = true)
		private String landLocatedPosition;
	@ApiModelProperty(value = "坐落位置维度")
	private BigDecimal landLocatedPositionLat;
	@ApiModelProperty(value = "坐落位置经度")
	private BigDecimal landLocatedPositionLgt;
	/**
	* 土地取得时间
	*/
		@ApiModelProperty(value = "土地取得时间")
		@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
		@JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
		private Date landAcquisitionTime;
	/**
	* 土地性质 编码100002
	*/
		@ApiModelProperty(value = "土地性质 编码100002", required = true)
		private String landNature;
	/**
	* 土地总面积(m²)
	*/
		@ApiModelProperty(value = "土地总面积(m²)", required = true)
		private BigDecimal landTotalArea;
	/**
	* 土地用途 编码100004
	*/
		@ApiModelProperty(value = "土地用途 编码100004", required = true)
		private String landUse;
	/**
	* 土地入账价值
	*/
		@ApiModelProperty(value = "土地入账价值", required = true)
		private BigDecimal landBookValue;
	/**
	* 确权情况 1已确权 2未确权 3部分确权
	*/
		@ApiModelProperty(value = "确权情况 1已确权 2未确权 3部分确权", required = true)
		private Integer landMadeSituation;

	/**
	* 未确权原因
	*/
		@ApiModelProperty(value = "未确权原因 未确权时必填")
		private String landNoMadeReason;
	/**
	* 已确权面积(m²)
	*/
		@ApiModelProperty(value = "已确权面积(m²) 已确权、部分确权必填")
		private BigDecimal landMadeArea;
	/**
	* 未确权面积m²
	*/
		@ApiModelProperty(value = "未确权面积(m²) 未确权、部分确权必填")
		private BigDecimal landNoMadeArea;
	/**
	* 证权人
	*/
		@ApiModelProperty(value = "证权人", required = true)
		private String landWarrant;
	/**
	* 证号
	*/
		@ApiModelProperty(value = "证号", required = true)
		private String landCardNumber;
	/**
	* 发证日期
	*/
		@ApiModelProperty(value = "发证日期", required = true)
		@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
		@JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
		private Date landReleaseDate;
	/**
	* 备注
	*/
		@ApiModelProperty(value = "备注")
		private String landRemark;
	/**
	* 房产名称
	*/
		@ApiModelProperty(value = "房产名称", required = true)
		private String houseName;
	/**
	* 房产地址
	*/
		@ApiModelProperty(value = "房产地址", required = true)
		private String houseLocatedPosition;

	@ApiModelProperty(value = "房产地址维度")
	private BigDecimal houseLocatedPositionLat;
	@ApiModelProperty(value = "房产地址经度")
	private BigDecimal houseLocatedPositionLgt;

	/**
	* 房屋结构 编码101004
	*/
		@ApiModelProperty(value = "房屋结构 编码101004")
		private String houseStructure;
	/**
	* 房产性质 编码101003
	*/
		@ApiModelProperty(value = "房产性质 编码101003", required = true)
		private String houseNature;
	/**
	* 房产总面积(m²)
	*/
		@ApiModelProperty(value = "房产总面积(m²)", required = true)
		private BigDecimal houseTotalArea;
	/**
	* 房产入账价值
	*/
		@ApiModelProperty(value = "房产入账价值", required = true)
		private BigDecimal houseBookValue;
	/**
	* 权利类型
	*/
		@ApiModelProperty(value = "权利类型")
		private String houseRightType;
	/**
	* 房产来源 编码101002
	*/
		@ApiModelProperty(value = "房产来源 编码101002")
		private String houseSource;
	/**
	* 房产规划用途 编码101001
	*/
		@ApiModelProperty(value = "房产规划用途 编码101001")
		private String houseUse;
	/**
	* 确权情况 1已确权 2未确权 3部分确权
	*/
		@ApiModelProperty(value = "确权情况 1已确权 2未确权 3部分确权", required = true)
		private Integer houseMadeSituation;
	/**
	* 未确权原因
	*/
		@ApiModelProperty(value = "未确权原因 未确权时必填")
		private String houseNoMadeReason;
	/**
	* 房屋已确权面积
	*/
		@ApiModelProperty(value = "房屋已确权面积 已确权、部分确权必填")
		private BigDecimal houseMadeArea;
	/**
	* 房屋未确权面积
	*/
		@ApiModelProperty(value = "房屋未确权面积 未确权、部分确权必填")
		private BigDecimal houseNoMadeArea;
	/**
	* 车位数量
	*/
		@ApiModelProperty(value = "车位数量")
		private Integer parkingNumber;
	/**
	* 证件类型 1房产证 2不动产证
	*/
		@ApiModelProperty(value = "证件类型 1房产证 2不动产证" , required = true)
		private Integer documentType;
	/**
	* 权证人
	*/
		@ApiModelProperty(value = "权证人", required = true)
		private String houseWarrant;
	/**
	* 证号
	*/
		@ApiModelProperty(value = "证号", required = true)
		private String houseCardNumber;
	/**
	* 发证日期
	*/
		@ApiModelProperty(value = "发证日期", required = true)
		@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
		@JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
		private Date houseReleaseDate;
	/**
	* 备注
	*/
		@ApiModelProperty(value = "备注")
		private String houseRemark;
	/**
	* 是否有可出租面积
	*/
		@ApiModelProperty(value = "是否有可出租面积", required = true)
		@JsonSerialize(using = ToStringSerializer.class)
		private Integer isHaveRentArea;
	/**
	* 是否每年公允值入账
	*/
		@ApiModelProperty(value = "是否每年公允值入账", required = true)
		@JsonSerialize(using = ToStringSerializer.class)
		private Integer isHaveFairValue;

	/**
	* 经办人
	*/
		@ApiModelProperty(value = "经办人")
		private String agent;
	/**
	* 联系电话
	*/
		@ApiModelProperty(value = "联系电话")
		private String phone;
	/**
	* 上个版本id
	*/
		@ApiModelProperty(value = "上个版本id")
        @JsonSerialize(using = ToStringSerializer.class)
		private Long lastVersionId;
	/**
	* 初始版本id
	*/
		@ApiModelProperty(value = "初始版本id")
        @JsonSerialize(using = ToStringSerializer.class)
		private Long initialId;
	/**
	* 版本号
	*/
		@ApiModelProperty(value = "版本号")
		private Integer version;
	/**
	* 不动产状态  1可引用状态  2变更审批中 3处置审批中 4处置审批完
	*/
		@ApiModelProperty(value = "不动产状态  1可引用状态  2变更审批中 3处置审批中 4处置审批完")
		private Integer landStatus;

	/**
	 * 委托单位
	 */
	@ApiModelProperty(value = "委托单位")
	private String entrustUnitId;

	@ApiModelProperty(value = "是否已委托 1否2是")
	private Integer isEntrust;

	/**
	* 审批人
	*/
		@ApiModelProperty(value = "审批人")
		private String approvedUser;
	/**
	* 审批时间
	*/
		@ApiModelProperty(value = "审批时间")
		@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
		@JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "Asia/Shanghai")
		private Date approvedTime;
	/**
	* 审批意见
	*/
		@ApiModelProperty(value = "审批意见")
		private String approvedOpinion;
	/**
	* 表单审批类型
	*/
		@ApiModelProperty(value = "表单审批类型")
		private String formType;

	@ApiModelProperty(value = "是否最新 1否2是")
		private Integer isLatest;

	@ApiModelProperty(value = "处置时间 注销时必填")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
	private Date disposalTime;

	@ApiModelProperty(value = "处置方式 编码107 注销时必填")
	private String disposalWay;

	@ApiModelProperty(value = "处置金额(元) 注销时必填")
	private BigDecimal disposalAmount;

	@ApiModelProperty(value = "处置备注 注销时必填")
	private String disposalRemark;

	@TableField(exist = false)
	@ApiModelProperty(value = "附件")
	private List<HashMap> docList;

	/**
	 * 数据来源 null为系统填报 对应用户id
	 */
	@ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
	private String dataSource;

	/**
	 * 数据来源id
	 */
	@ApiModelProperty(value = "数据来源id", required = true)
	private String dataSourceId;
	/**
	 * 20241217 zsk 增加土地获取方式
	 */
	@ApiModelProperty(value = "土地获取方式 字典取值：100007")
	private String landGetMode;
	/**
	 * 20241217 zsk 增加可出租面积
	 */
	@ApiModelProperty(value = "可出租面积")
	private BigDecimal canRentArea;
	/**
	 * 20241217 zsk 增加已出租面积
	 */
	@ApiModelProperty(value = "已出租面积")
	private BigDecimal haveRentArea;

	@ApiModelProperty(value = "目前资产用途")
	private String currAssetUsage;

	@ApiModelProperty(value = "收取租金")
	private BigDecimal acceptRent;

	@ApiModelProperty(value = "出租年限")
	private Integer rentDuration;
}
